Method and apparatus for encoding moving picture signals and recording medium for recording moving picture signals

ABSTRACT

A method and apparatus for encoding moving picture signals. A plurality of encoding picture groups, each consisting of a pre-set number of encoding pictures freed of redundant pictures from a plurality of original pictures represented by the input moving picture signals, are formed, and the number of original pictures used for forming the encoding picture groups and the group-based target bit amount are calculated. The moving picture signals of the encoding pictures are encoded from one picture group to another based upon the target bit amount. Even if the encoding picture rate is changed from one picture group to another, the target bit amount can be adaptively controlled with these changes in the encoding picture rate. Consequently, there is no risk of the output bit rate significantly surpassing the target value. In addition, there is no risk of the total bit amount in the bit stream exceeding the target amount to render it impossible to record the bit stream on a desired moving picture signal recording medium.

BACKGROUND OF THE INVENTION

This invention relates to a method and apparatus for encoding movingpicture signals, and a recording medium for recording moving picturesignals. More particularly, it relates to a method and apparatus forencoding moving picture signals, employed for recording moving picturesignals on a recording medium, such as a magneto-optical disc or amagnetic tape, reproducing the moving picture signals from the recordingmedium for display or transmitting moving picture signals over atransmission channel from a transmitting side to a receiving side, suchas in a teleconferencing system, video telephone system or abroadcasting equipment, and a recording medium for recording the movingpicture signals.

If the moving picture signals are directly digitized, the data volumewill become tremendous, such that, for transmitting data of the movingpicture signals over a transmission channel of a limited transmissioncapacity, data encoding (compression) becomes necessary.

In general, the moving pictures are not steady such that picturepatterns or movements are changed with lapse of time. In addition, thepicture patterns or movements in the same picture may be changedsignificantly at the mid region or at peripheral regions. Thus theamount of the information generated at an encoder configured forencoding the moving picture signals is also changed significantlydepending on these changes in the picture patterns or movements. Inorder for the encoder output, that is the amount of the informationproduced by the encoder, which is changed from picture to picture, to betransmitted at a constant transmission bit rate, a transmission bufferis provided at the ultimate stage of the encoder. That is, the encoderoutput, which is changed from picture to picture, is temporarily storedin a transmission buffer, and read out at a constant bit rate and sentover the transmission channel for maintaining a constant data quantityof the encoder output.

As a control unit for the encoder output, that is the amount ofinformation, a group unit consisting of plural consecutive pictures isfrequently employed. That is, the control method is used in which thetotal amount of the information for the group is suppressed to be nothigher than a target value, even although the amount of the informationis changed in the group from picture to picture. The number of thepictures of the group is usually fixed. Among the widely used number ofpictures is the group of pictures (GOP) adopted in MPEG2 (ISO/IEC13818).

In FIG. 1, there is shown, in a block diagram, an illustrative circuitconstruction of an encoding apparatus (encoder) configured forcontrolling the amount of the generated information on the GOP basis. Anoriginal input picture signal S1 entering a terminal 100 is converted ina pre-processor 101 into a frame signal for encoding S2. In thepre-processor, no specific processing-is executed.

The frame signal for encoding S2 enters an encoding unit 102 where it isencoded. The encoding unit 102 outputs the encoded information S3. Theencoding unit 102 effects encoding by a hybrid encoding method which iswidely known in MPEG2 and which consists in the combination of motioncompensated predictive coding and discrete cosine transform (DCT). Theencoded information S3 is temporarily stored in a transmission buffer104, while being entered to a frame bit counter 106. The frame bitcounter counts the number of bits of the encoded information S3 andoutputs the count value as a bit quantity for encoding S7.

The above-described conventional encoder for encoding moving picturesignals controls the amount of the generated information in terms of aGOP consisting of N pictures for encoding 10 (frame signal for encodingS2) as a unit, as shown in FIG. 2. That is, a calculator 108 calculatesa target bit amount G, allocated to each GOP, in accordance with thefollowing equation (1):

    G=(bit.sub.-- rate×N)/coded.sub.-- frame.sub.-- rate (1)

where coded₋₋ frame₋₋ rate is the frame rate of the frame signal forencoding S2, while bit₋₋ rate is the bit rate of the bit stream S4outputted by the transmission buffer 104. The calculator 108 sets thetarget bit amount G as a signal S8 which is supplied via a switch 110 toa register 107.

On the other hand, a base-N counter 105 counts a frame synchronizationsignal for encoding S5, supplied thereto from the pre-processor 101 insynchronism with the frame signal for encoding S2 entering the encodingunit 102, for counting the number of frames entering the encoding unit102 from 1 to N. The base-N counter 105 sets a flag S6 when the countvalue is 1 for controlling the switch 110 to be turned on. The result isthat the target bit amount G is fed via switch 110 to the register 107,which then stores the target bit quantity G.

On the other hand, if a frame synchronization signal for encoding S5 isoutputted by the pre-processor 101,a switch 109 is turned on. Anencoding bit amount S7 of the frame signal for encoding S2, enteredduring the directly previous frame, enters the register 107, which thensubtracts the encoding bit amount S7 from the target bit amount G. Theframe bit counter 106 then is immediately cleared to zero.

Thus, at a time instant the frame signal for encoding 52, encoded forthe first time in the GOP, enters the encoding unit 102, the target bitamount G of the GOP is stored in the register 107. Then, each time theframe signal for encoding S2 is encoded, the encoding bit amount S7 issubtracted from the value of the register 107.

The value of the register 107, that is a residual bit number S9allocated to the GOP, is fed to an encoding parameter controller 103,which then controls the encoding parameter of the encoding unit 102 byan encoding parameter control signal S16 based upon the residual bitnumber S9. The encoding parameter controller manages control so that thetarget bit amount G allocated to the GOP approaches the actuallygenerated bit amount. Thus, when the GOP is encoded in its entirety, theresidual bit number S9 in the register 107 ideally becomes equal tozero.

The transmission buffer 104 has a storage capacity capable ofsufficiently absorbing dynamic changes in the amount of the generatedinformation in the GOP. Thus the transmission buffer 104 steadily readsout the encoding information stored therein at the designated bit rateand outputs the read-out information at a terminal 111. Thus, if theamount of the generated information is to be controlled on the GOPbasis, the moving picture signal can be encoded using theabove-described conventional moving picture encoding apparatus when thenumber of encoding pictures in each GOP, that is an encoding picturerate, is constant, as shown in FIG. 2.

It is now assumed that redundant pictures among the original inputmoving picture signals S1 are detected and eliminated so as not to enterthe encoding unit 102. The redundant picture herein means such a picturewhich is a repetition of a directly previous past picture and hence neednot to be encoded.

If the period of appearance of such redundant picture among the originalinput picture signals S1 is constant, the encoding picture rate becomesconstant for all of the GOPs, so that the moving picture signals can beencoded using the above-described conventional moving picture signalencoding apparatus. For example, if a redundant picture appears everyfive pictures, the encoding picture rate f₁ is given by the followingequation (2):

    f.sub.1 =5/(699×Δt)                            (2)

where Δ is the picture period of the original input picture signal S1.

However, if the period of appearance of the redundant picture 11 isdisturbed, as shown in FIG. 3, due to, for example, video editing, thetime of duration or display of each GOP consisting of N frames becomesvariable such that the encoding picture rate f₁ becomes variable.Specifically, the time of duration of GOP-1, GOP-2 and GOP-3 becomesequal to 6×Δt, 5×Δt and 7×Δt, such that the encoding picture rate ofeach of GOP-1, GOP-2 and GOP-3 becomes 5/6×Δt, 5/5×Δt and 5/7×Δt,respectively, as shown in Table 1.

    ______________________________________                                                 duration (display) of                                                                    encoding picture                                                   each GOP   rate of each GOP                                          ______________________________________                                        GOP-1      6 × Δt                                                                         5/(6 × Δt)                                GOP-2      5 × Δt                                                                         5/(5 × Δt)                                GOP-3      7 × Δt                                                                         5/(7 × Δt)                                ______________________________________                                    

Thus the conventional moving picture encoder controlling the amount ofthe generated information on the GOP basis suffers from the problemthat, since coded₋₋ frame₋₋ rate in the equation (1) is changed, controlof the amount of the generated information is likely to be infeasible.For example, with the encoding picture rate of the GOP-2 equal to f₂, asshown in FIG. 3, data is produced in the GOP-2 in an amount larger by ΔGas found by the equation (3):

    ΔG=(bit.sub.-- rate×N)/f.sub.1 -(bit.sub.-- rate×N)/f.sub.2                                     ( 3)

The result is that the output bit rate exceeds the target bit amount Gsignificantly. If such ΔG is added for the remaining GOPs in theoriginal input picture signal, the total bit amount of the encoding bitstream S14 exceeds a design value such that the bit stream cannot berecorded on the desired recording medium, such as a magneto-optical discor a magnetic tape.

In addition, the transmission buffer 104 shown in FIG. 1 tends tooverflow such that the buffer capacity control becomes unstable.Consequently, the encoding parameter in the encoding parametercontroller 103 becomes difficult to control, as a result of which thepicture quality tends to be deteriorated.

OBJECT AND SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a methodand apparatus for encoding moving picture signals whereby the amount ofthe generated information can be controlled correctly even if thegroup-based encoding picture rate is changed due to pre-processing foreliminating redundant pictures from the input moving picture at the timeof encoding picture signals in the moving picture (moving picturesignals).

In one aspect, the present invention provides a method for encodinginput moving picture signals including forming encoding picture groupseach consisting of a pre-set number of encoding pictures freed ofredundant pictures from a plurality of original pictures represented bythe input moving picture signals, calculating the number of originalpictures used for forming said encoding picture groups, calculating thegroup-based target bit amount based upon the calculated number oforiginal pictures, and encoding the moving picture signals of theencoding pictures on the basis of the target bit amount on the groupbasis.

The number of the encoding pictures making up each group may bevariable. The step of calculating the target amount of the informationincludes the sub-steps of calculating the time duration of each groupbased upon the calculated number of the original pictures, andcalculating the target amount of information of each group based uponthe calculated time duration. The step of calculating the target amountof the information includes the sub-steps of calculating the encodingpicture rate of each group based upon the calculated number of theoriginal pictures, and calculating the target amount of information ofeach group based upon the calculated encoding picture rate.

In another aspect, the present invention provides an apparatus forencoding input moving picture signals including means for formingencoding picture groups each consisting of a pre-set number of encodingpictures freed of redundant pictures from a plurality of originalpictures represented by the input moving picture signals, means forcalculating the number of original pictures used for forming theencoding picture groups in the group forming means, means forcalculating the group-based target bit amount based upon the calculatednumber of original pictures from the original picture number calculatingmeans, and means for encoding the moving picture signals of the encodingpictures on the basis of the target bit amount on the group basis.

The number of the encoding pictures making up the groups in said groupforming means may be variable.

In still another aspect, the present invention provides an apparatus forencoding input moving picture signals including pre-processing means forforming encoding picture groups each consisting of pre-set numbers ofencoding pictures freed of redundant pictures from a plurality oforiginal pictures represented by the input moving picture signals andfor calculating the numbers of the original pictures used for formingthe respective groups, means for calculating the time of duration of therespective groups based upon the numbers of the original pictures fromthe pre-processing means and storing the calculated time duration, meansfor calculating the degree of encoding difficulty of the respectivegroups based upon the input moving picture signals, memory means forstoring the degree of encoding difficulties of the respective groupsfrom the encoding difficulty calculating means, means for calculatingthe group-based target amount of the information based upon the durationof time from the time duration calculating means and the degree ofencoding difficulties from said memory means, and encoding means forgroup-based encoding of the moving picture signals of the encodingpictures from the pre-processing means based upon the target amount ofinformation from the information amount calculating means.

Calculating the amount of information to provide a maximum value of thetarget amount of information. The time duration calculating means storesat least one of the number of original pictures from the pre-pressingmeans, the time duration calculated based upon the numbers of theoriginal pictures and the encoding picture rate calculated based uponthe numbers of the original pictures. The information amount calculatingmeans calculates the target amount of information using the numbers oforiginal pictures, time duration or the encoding picture rate as storedin the duration calculating means when the moving picture signals areencoded by the calculating means.

In yet another aspect, the present invention provides a recording mediumfor recording moving picture signals having recorded thereon a bitstream obtained on forming encoding picture groups each consisting of apre-set number of encoding pictures freed of redundant pictures from aplurality of original pictures indicated by the input moving picturesignals, calculating the number of original pictures used for formingthe encoding picture groups, calculating the group-based target bitamount based upon the calculated number of original pictures, andencoding the moving picture signals of the encoding pictures on thebasis of the target bit amount on the group basis.

In accordance with the present invention, the encoding picture groupseach consisting of a pre-set number of encoding pictures freed ofredundant pictures from a plurality of original pictures represented bythe input moving picture signals are formed, and the number of originalpictures used for forming the encoding picture groups and thegroup-based target bit amount are calculated. The moving picture signalsof the encoding pictures are encoded from one picture group to anotherbased upon the target amount of the information. Thus, even if theencoding picture rate is changed from one picture group to another, thetarget bit amount can be adaptively controlled for these changes in theencoding picture rate. Thus there is no risk of the output bit ratesignificantly surpassing the target value. In addition, there is no riskof the total bit amount in the bit stream exceeding the target amountthus disabling the recording of the bit stream on the desired movingpicture signal recording medium. Also the transmission buffer capacitymay be controlled in stability, so that the encoding parameters may becontrolled stably to produce a clear stable picture.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the construction of a conventionalmoving picture signal encoding apparatus.

FIG. 2 illustrates the principle of encoding with five encoding picturesas a GOP.

FIG. 3 illustrates the principle of encoding in which redundant picturesare removed at an irregular period.

FIG. 4 illustrates an illustrative example in which inverse 2-3pull-down in carried out ideally.

FIG. 5 illustrates an illustrative example in which inverse 2-3pull-down is carried out incorrectly.

FIG. 6 is a block diagram showing the construction of a moving picturesignal encoding apparatus according to a first embodiment of the presentinvention.

FIG. 7 is a block diagram showing an illustrative construction of apre-processor constituting the moving picture signal encoding apparatusshown in FIG. 6.

FIG. 8 is a block diagram showing an illustrative construction of afield number calculator constituting the moving picture signal encodingapparatus shown in FIG. 6.

FIG. 9 is a block diagram showing the construction of a moving picturesignal encoding apparatus according to a second embodiment of thepresent invention.

FIG. 10 is a block diagram showing the construction of a moving picturesignal encoding apparatus according to a third embodiment of the presentinvention.

DESCRIPTION OF PREFERRED EMBODIMENTS

Referring to the drawings, preferred embodiments of a method andapparatus for encoding moving picture signals and a recording medium forrecording moving picture signals will be explained in detail. In thefollowing embodiments, the present invention is applied to a movingpicture signal encoding apparatus configured for encoding, as originalmoving picture signals, picture signals of a film source having itsframe rate set to 30 Hz by the 2-3 or 3-2 pull-down system used intele-cine.

The 2-3 pull-down system is briefly explained. For converting the filmsource, such as a motion picture, to interlaced video signals(telecine), the 2-3 pull-down system is widely employed. Specifically,if, with the film rate of 24 frames per sec (24 Hz), the rate ofinterlaced video signals is 30 frames/sec (60 fields/sec), the fieldnumber conversion is carried out by 2-3 pull-down. This is achieved byreading out the first one of two frames of a film in two fields of videosignals and reading out the next frame of the film in three fields.

The inverse 2-3 pull down is carried out by detecting the frames of thefilm read out with three fields of the interlaced video signals of 30frames/sec, removing redundant fields and producing a progressivelyscanned frame ideally at a rate of 24 frames/sec. FIG. 4 shows anillustrative example in which this has been achieved ideally. That is,redundant fields ideally appear at a period of five frames.

If the inverse 2-3 pull-down is achieved ideally, the encoding framerate is constant at 24 Hz, such that the input moving picture signal canbe encoded with the above-described conventional encoder. However, theinverse 2-3 pull-down cannot necessarily be achieved correctly for thefollowing reason.

(1) The pattern of the redundant fields appearing at the period of fivefields cannot be assured due to film editing following 2-3 pull-down.

(2) Since a smoothing filter is used after the 2-3 pull-down along thetime axis, that is between the fields or frames, redundant fields 14become difficult to detect depending upon the picture pattern. Ineffect, there are occasions wherein a flag S607 explained subsequentlyin connection with FIG. 7 is not set for a redundant field. That is, theflag is occasionally not useful in a comparator 507 shown in FIG. 7 evenalthough the field is a redundant field.

FIG. 5 shows an illustrative example in which a redundant field 14 hasnot been detected and the inverse 2-3 pull-down has been carried outincorrectly. The encoding frame rate then is 30 Hz. Since in effect theinverse 2-3 pull-down is not necessarily carried out ideally, theencoding frame rate is not necessarily constant but is varied in a rangeof from 24 Hz to 30 Hz. Consequently, with the MPEG2, the time ofduration of GOP made up of N (N≧1) is not constant. It is envisaged withthe present invention to correctly control the amount of the informationgenerated by encoding in such case from one GOP to another.

In the following explanation, the value of N may be fixed or variable.For example, the value of N may be controlled to be larger or smaller ifthe same scene lasts for prolonged time or if the scene is changed at ashort time interval.

First Embodiment

The moving picture signal encoder according to the first embodiment ofthe present invention has a pre-processor 301 for removing redundantfields from the original input picture signal S101, an encoding unit 302for encoding an encoding frame signal S102 from the pre-processor 301,an encoding parameter controller 303 for controlling the encodingparameter of the encoding unit 302 and a transmission buffer 304 foroutputting the encoded information from the encoding unit 302 at aconstant bit rate, as shown in FIG. 6.

The moving picture signal encoder frees the film source video signals,entering a terminal 300 as original input picture signal S101, of videosignals of redundant fields to generate an encoding frame signal S102,which is encoded. The resulting encoded information S103 is transientlystored in the transmission buffer 304 and subsequently outputted over atransmission channel at a terminal 311 as a bit stream S104 at a pre-settransmission bit rate.

The moving picture signal encoder is also configured for appending anerror correction code to the bit stream S104 by a modulator 321,modulating the resulting data in a manner suited for recording and fordriving an optical pickup 322 with the modulated bit stream S104 forencoding and recording the film source video signals on amagneto-optical disc 324 run in rotation by a motor 323. The encodingunit 302, the encoding parameter controller 303 and the transmissionbuffer 304 perform the same role as that of the corresponding components102 to 104 of the conventional encoder and hence the descriptiontherefor is omitted for clarity. That is, the encoding unit 302 isdesigned pursuant to the MPEG2 and is made up of a motion compensatedprediction encoding unit, a DCT circuit, a quantizer and a variablelength encoder. The recording medium for recording moving picture films,that is the bit stream S104, may be exemplified by a magnetic disc or amagnetic tape.

In this manner, the film source video signals are encoded andtransmitted or otherwise recorded on a moving picture signal recordingmedium. With the present moving picture encoder, the amount of theinformation generated from one GOP to another may be controlledcorrectly even in cases wherein the encoding frame rate is fluctuated ina range of from 24 Hz to 30 Hz.

Referring to FIG. 6, the moving picture encoder includes a field numbercounter 312 for calculating the number of fields in each encodingpicture group consisting of N frames divided from the original inputpicture signal S101, and a field count value memory 316 for storing thenumber of fields from the field number counter 312. The encoder alsoincludes a calculator 317 for calculating the time length of theencoding picture group based upon the number of fields stored in thememory 316 and a calculator 308 for calculating the target amount ofbits G based upon e.g., the duration from the encoding unit 302. Theencoder also includes a base-N counter 350 for counting the number offrames of the encoding frame signal S102 entering the encoding unit 302,and a frame bit counter 306 for counting the number of bits of theencoding information S103 from the encoding unit 302. The encoder alsoincludes a register 307 for subtracting the encoding bit amount S107from the frame bit counter 306 from the target bit amount G, and aswitch 307 for supplying the encoding bit amount S107 from the frame bitcounter 306 to the register 307. The encoder finally includes a switch310 for supplying the target bit amount G from the calculator 308 to theregister 307 based upon a flag S150 from the base-n counter 350.

Referring to FIG. 7, the pre-processor 301 for detecting and removingredundant fields by inverse 2-3 pull-down includes delay units 502, 503for sequentially delaying a field picture signal S601, and an adder 504for calculating the difference between a delayed picture signal S602from the delay unit 503 and the field picture signal S601. Thepre-processor also includes an absolute value calculator 505 forcalculating the absolute value of the difference value from the adder504 and an accumulator 506 for finding the sum of one-filed absolutevalues from the absolute value calculator 505. The pre-processor alsoincludes a comparator 507 for comparing the accumulated value from theaccumulator 506 to a pre-set threshold stored in a memory 508 and afield counter 510 for counting the number of fields entering thepre-processor. The pre-processor also includes a comparator 511 forcomparing the number of fields from the field counter 510 to a pre-setvalue, and an AND gate 512 for finding a logical product of the flagsS607 and S610 from the comparators 507 and 511.

The delay unit 502 is fed via a terminal 501 with the original inputpicture signal S101, as the field picture signal S601, entering thepre-processor 301 via terminal 300 of FIG. 6. The delay units 502, 503sequentially delay the field picture signal S601 of e.g., 60 Hz,supplied via terminal 501, and send the delayed signal to an adder 504.The adder 504 finds the pixel-based difference between the field picturesignal S601, supplied thereto via terminal 501, and the field picturesignal S602 delayed by two fields by field delay units 502, 503, that issubtracts the field picture signal S601 from the field picture signalS602, pixel by pixel, and transmits the resulting difference to theabsolute value calculator 505.

The absolute value calculator 505 finds the absolute value of thepixel-based difference S603 and sends the absolute value to theaccumulator 506 as an absolute value S604. The accumulator 506 finds thefield-based sum of the absolute values S604 and sends the sum as anaccumulated value S605 to the comparator 507.

The comparator 507 is fed with a pre-set value, previously stored in thememory 508, as a threshold value S606. The comparator compares theaccumulated value S605 supplied from the accumulator 506 to thethreshold value S606. If the accumulated value S605 is smaller than thethreshold value S606, the comparator sets a flag S607 which is fed tothe AND gate 512.

The field counter 510 is fed via terminal 59 with the fieldsynchronization signal S120, as a field picture signal S608, entered tothe pre-processor 301 via terminal 313 shown in FIG. 6. The fieldcounter 510 counts the number of fields entering the pre-processor 301.The field counter 510 sends the count value j to the comparator 511 as asignal S609. If the count value j of the signal S609 is an odd numbernot less than 5, the comparator 511 sets the flag S610 to 1 and feedsthe flag to the AND gate 512.

The AND gate 512 finds the logical sum of the flag S607 from thecomparator 507 and the flag S610 from the comparator 511. If the flagsS607 and S610 are both 1, the redundancy field detection flag S611 isset to 1 and outputted at a terminal 513. That is, the currently enteredfield picture signal S601 is judged to be a redundant field overlappedby 2-3 pull-down. If the redundancy detection flag S611 is 1, the fieldcounter 510 is cleared to zero.

Based upon the redundant field detection flag S61, thus detected, thepre-processor 301 removes the field found to be redundant as shown inFIG. 3 and sends video signals of the remaining fields as encoding framesignals S102 to the encoding unit 302. The encoding unit 302 encodes theencoding frame signals S102 as described previously. Thus the movingpicture signals of the removed fields are not encoded.

The present moving picture signal encoding apparatus, which encodes theencoding frame signal freed of the redundant fields as described above,differs significantly from the conventional moving picture encoder shownin FIG. 1 in controlling the target bit amount G allocated to the GOP bythe field count value j from the field count value memory 316.

That is, the present moving picture signal encoder employs a two-passencoding method. During the first pass, the original input picturesignal is divided into encoding picture groups based on N frames (Nβ1).The number of fields of the original input picture signal entered at thetime of the preparation of the encoding picture groups is counted andstored in a memory. During the second pass, when the original inputpicture signal of the encoding picture group is encoded, the number offields associated with the encoding picture group is read out from thememory. Based on this value, the target number of bits G of the encodingpicture group, that is the target value of the amount of bits of theinformation generated by encoding, is calculated for controlling thetarget bit amount G.

Specifically, the field number counter 312 is a circuit for realizingthe sequence of operations for the first pass. As shown in FIG. 8, thefield number counter includes a base-N frame counter 305 for countingthe encoding frame synchronization signal S105 for the pre-processor301, a field counter 314 for counting the field synchronization signalS120, and a switch 315 for sending the field count value j from thefield counter 314 to a field count value memory 316.

The pre-processor 301 is comprised of an inverse 2-3 pull-down. Whenfreeing the film source original input picture signal S101 entering thepre-processor 301 via the terminal 300 at a frame rate of 30 Hz ofredundant fields to generate the encoding frame signal S102 which issent to the encoding unit 302, the pre-processor sends the encodingframe synchronization signal S105 synchronized with the output of theencoding frame signal S102 to the base-N frame counter 305.

The base-N frame counter 305 counts the encoding frame synchronizationsignal S105 from 1 to N and, when the count value reaches N, the base-Ncounter 305 sets the flag S106 to 1 and outputs the flag. The base-Ncounter 305 controls the field counter 314 and the switch 315 by thisflag S106.

The field counter 314 is fed via a terminal 313 with a fieldsynchronization signal S120, synchronized with the field of the originalinput picture signal S101. The field counter 314 is cleared to zero whenthe flag S106 from the base-N counter 305 is 1 and counts the fieldsynchronization signal S120. The field counter 314 sets the count valueto a signal S121 which is fed via switch 315 and terminal 331 to thefield count value memory 316. The switch 315 is controlled by the flagS106 from the base-N counter 305 and is turned on when the flag S106is 1. That is, the field count value memory 316 is fed with a fieldcount value j specifying the number of fields which entered thepre-processor 301 when the current encoding picture group was prepared.The result is that the field count value j for each encoding picturegroup is sequentially stored in the field count value memory 316. Theabove operation constitutes the first-pass operation.

Referring to FIG. 6, the operation for the second pass is explained. Theframe bit counter 306, register 307 and the switches 309, 310 shown inFIG. 6 perform the same function as that of the frame bit counter 106,register 107 and the switches 109, 110 of the conventional movingpicture encoder shown in FIG. 1 and hence are not explained forsimplicity.

The pre-processor 301 frees the original input picture signal suppliedthereto via the terminal 300 of redundant fields to produce the encodingframe signal S102 which is supplied to the encoding unit 305. At thistime, the pre-processor 301 sends the encoding frame synchronizationsignal S105 to the base-N counter 350 in timed relation to theoutputting of the encoding frame signal S102. The pre-processor alsocontrols the switch 309 by the encoding frame synchronization signalS105. The pre-processor 301 appends the information as to whether theredundant field has been removed and the position information of theremoved field to the header information of the encoding frame signalS102.

The base-N frame counter 350 counts the encoding frame synchronizationsignal S105 sent from the pre-processor 310 for counting the number offrames entering the encoding unit 102 from 1 to N. When the count valuereaches 1, that is when the encoding frame signal S102 of the currentencoding picture group which is encoded first enters the encoding unit302, the base-N frame counter 350 sets the flag S150 to 1. The base-Nframe counter 350 controls the field count value memory 316 and theswitch 310 based on this flag S150.

In the field count value memory 318, the field count values j for all ofthe encoding picture groups, obtained by the first pass, are stored.Each time the flag S150 is 1, the field count values j stored in thememory 316 are sequentially read out. The field count values j thus readout are sent as the signal S111 to a calculator 317.

The calculator 317 converts the field count value j, supplied as thesignal S111, into a value of a different dimension, such as the duration(display) of the encoding picture group as found by the equation (4):

    ΔT=j×(field period)                            (4)

The calculator 317 sends the duration ΔT as a signal S112 to thecalculator 308 configured for calculating the target bit amount G.

The calculator 308 calculates the target bit amount G allocated to theencoding picture group, based upon the duration ΔT of the currentencoding picture group, in accordance with the equation (5):

    G=bit.sub.-- rate×ΔT                           (5)

where bit₋₋ rate is the bit rate of the bit stream S104 outputted fromthe transmission buffer 304. The calculator 308 sends the calculatedtarget bit amount G as a signal S108 to the register 307 via switch 310.

It is also possible for the calculator 317 to find the encoding framerate R of the encoding picture group in accordance with the equation(6):

    R=N/(j×(field period))                               (6)

while it is also possible for the calculator 308 to find the target bitamount G in accordance with the following equation (7):

    G=bit.sub.-- rate×N/R                                (7)

using the encoding frame rate R.

The target bit amount G thus found is sent to the register 307, via theswitch 310 controlled by the flag S150 from the base-N frame counter350, at the time of encoding the first encoding frame signal S102 of theencoding picture group.

The register 307 is fed, via the switch 309 controlled by the encodingframe synchronization signal S105 from the pre-processor 301, with theencoding bit amount S107 from the frame bit counter 308. Each time theencoding frame signal S102 for one frame is encoded, the register 307subtracts the encoding bit amount S107 from the target bit amount G tosend a residual amount S109 of the target bit amount G to the encodingparameter controller 303.

The encoding parameter controller 303 controls the encoding parameter ofthe encoding unit 302 by an encoding parameter control signal S116derived from the residual amount S109 of the target bit amount G. Thecontrol operation by the encoding parameter controller 303 is so madethat the target bit amount G allocated to the encoding picture groupapproaches the actually produced bit amount. If the encoding unit 302 ispursuant to the MPEG2, the encoding parameter controller 303 controlsthe quantization step size for encoding.

Thus it is possible with the moving picture signal encoder of thepresent invention to control the amount of the generated informationcorrectly even if, during encoding of the moving picture signal, theencoding frame rate is varied from one encoding picture group to anotherdue to pre-processing such as elimination of redundant pictures from theinput moving picture. In addition, it is possible with the presentmoving picture encoder to overcome the problem of the conventionalmoving picture signal encoder, namely the output bit rate exceeding thetarget amount significantly, by adaptively changing the target bitamount G in connection with changes in the encoding frame rate from onepicture group to another.

Also it is possible with the present moving picture encoder to overcomethe problem that the total bit amount of the bit stream exceeds thetarget value such that the bit stream cannot be recorded on the desiredmoving picture signal recording medium.

In addition, the transmission buffer capacity may be controlled stablyas a result of which the encoding parameters may be controlled stablyand a stable clear picture may be produced.

On the moving picture signal recording medium, such as a magneto-opticaldisc, the bit stream obtained by the above-described encoding isrecorded.

The moving picture signal encoder according to a second embodiment ofthe present invention is now explained.

Referring to FIG. 9, the moving picture signal encoder according to thepresent second embodiment includes a pre-processor 401 for freeing theoriginal input picture signal of redundant fields, and a delay unit 412for delaying the encoding frame signal S202 from the pre-processor 401.The moving picture signal encoder also includes an encoding unit 402 forencoding the encoding frame signal S211 delayed by the delay unit 412and an encoding parameter controller 403 for controlling the encodingparameters of the encoding unit 402. The moving picture signal encoderalso includes a transmission buffer 404 for outputting the encodedinformation S203 from the encoding unit 402 at a pre-set pitch rate, anda field counter 414 for counting the number of fields of each of N-framebased encoding picture groups divided from the original input picturesignal S201. The moving picture signal encoder also includes acalculator 417 for calculating the duration of the encoding picturegroup based upon the number of fields from the field counter 414, and acalculator 408 for calculating the target bit amount G based upon theduration from the delay unit 412. The moving picture signal encoder alsoincludes a base-N frame counter 405 for counting the number of frames ofthe encoding frame signal S202 entering the delay unit 412 and a framebit counter 406 for counting the number of bits of the encodedinformation S203 from the encoding unit 402. The moving picture signalencoder also includes a register 407 for storing the target bit amount Gfrom the calculator 408 and for subtracting the encoded bit amount S207from the frame bit counter 406 from the target bit amount G, and aswitch 409 for supplying the encoded bit amount S207 from the frame bitcounter 406 to the resister 407 based upon the encoding framesynchronization signal S205 from the pre-processor 401. The movingpicture signal encoder also includes a switch 410 for supplying thetarget bit amount G from the calculator 408 to the register 407 basedupon the flag S215 from the base-N frame counter 450.

That is, the present moving picture encoder has the delay unit 412between the pre-processor 401 and the encoding unit 402, while havingthe field counter 414 and the switch 416 in place of the field numbercounter 312 and the field count value memory 316 of the above-describedmoving picture signal encoder. In other words, the present movingpicture signal encoder significantly differs from the conventionalmoving picture signal encoder shown in FIG. 1 in controlling the targetbit amount G accorded to e.g., a N-frame based encoding picture group,such as GOP, where N≧1, by the field count value j from the fieldcounter 414. In the present moving picture signal encoder, the encodingparameter controller 403, transmission buffer 404, frame bit counter406, register 407 and the switches 409, 410 have the same functions asthose of the encoding parameter controller 103, transmission buffer 104,frame bit counter 106, register 107 and the switches 109, 110, so thatthese components are not explained for simplicity.

The pre-processor 401 is comprised of an inverse 2-3 pull-down circuitfor removing redundant fields from the original input picture signalS201, which is e.g., a film-source video signal entering a terminal 400at a frame rate of 30 Hz, to produce an encoding frame signal S202 whichis supplied to the delay unit 412. The pre-processor 401 feeds theencoding frame synchronization signal S205, synchronized with theoutputting of the encoding frame signal S202, while controlling theswitch 409 by the encoding frame synchronization signal S205.

The delay unit 412 is comprised e.g., of a frame memory for delaying theencoding frame signal S202 by one frame and for sending the delayedencoding frame signal S211 to the encoding unit 402. The encoding framesignal S211 is encoded by the encoding unit 402, as in the case of theconventional moving picture signal encoder.

The base-N counter 405 counts the encoding frame synchronization signalS205, fed from the pre-processor 401, from 1 to N. When the count valuebecomes N, the base-N counter sets the flag S206 to 1. Subsequently,when the count value becomes 1, the base-N counter sets the flag S215 to1.

The field counter 414 is fed via terminal 413 with a fieldsynchronization signal S212, synchronized with the field of the originalinput picture signal S210. When the flag S206 is 1, the field counter414 is cleared to zero and counts the field synchronization signal S212to set the count value as the signal S213 which is fed via switch 413 toa calculator 417.

A switch 415 is turned on when the flag S206 is 1 and sends the countvalue to the calculator 417. When the current encoding picture group isformed, the calculator 417 is fed with the field count value jindicating the number of fields entering the pre-processor 401.

As in the first embodiment, the calculator 416 calculates the durationΔT from the equation (4) and sends the duration ΔT as signal S214 to thecalculator 408.

As in the first embodiment, the calculator 408 calculates the target bitamount G, allocated to the encoding picture group, in accordance withthe equation (5), and sends the target bit amount G as signal S208 viaswitch 410 to the register 407.

In the present moving picture signal encoder, as in the moving picturesignal encoder of the previous embodiment, the amount of the generatedinformation is controlled on the basis of the target bit amount G. Thetarget bit amount G may also be found from the equations (6) and (7).

Thus the effect to that achieved with the moving picture signal encoderof the previous embodiment may be achieved with the present movingpicture signal encoder.

Third Embodiment

The moving picture signal encoder according to a third embodiment of thepresent invention is now explained. The present moving picture signalencoder employs the variable rate encoding method. In other words, thetarget bit amount G allocated to the encoding picture group is notconstant with the present moving picture signal encoder. That is, thetarget bit amount G is found on the basis of the degree of codingdifficulty as proposed in our previous application (JP PatentApplication No.5-105943) and the amount of the generated information iscontrolled on the basis of the target bit amount.

Referring to FIG. 10, the present moving picture signal encoder includesa pre-processor 601 for removing redundant fields from the originalinput picture signal S701, and a memory/calculator 602 for storing thenumber of fields of the encoding picture groups from the pre-processor701 and calculating the duration of time based upon the number of fieldsstored therein. The present moving picture signal encoder also includesa calculator 603 for calculating the degree of encoding difficulty ofthe encoding picture groups based upon the original input picture signalS701, and a memory 604 for storing the degree of encoding difficultyfrom the calculator 603. The present moving picture signal encoder alsoincludes a comparator 605 for calculating the target bit amount G basedupon the duration of time from the memory/calculator 602 and the degreeof encoding difficulty from the memory 604 and for setting the targetbit amount G so as to be less than the maximum bit rate, and an encodingunit 606 for encoding the encoding frame signal S702 from thepre-processor 601 based upon the target bit amount G from the comparator605.

The pre-processor 601 removes redundant fields from the original inputpicture signal S701 entering a terminal 600 and divides the originalinput picture signal S701 into N frame based encoding picture groups,where N≧1. The pre-processor then sequentially sends field count valuesj specifying the number of fields of respective encoding picture groupsas signal S703 to the memory/calculator 602.

The memory/calculator 602 stores the field count value j supplied fromthe pre-processor 601 and, using these field count values j, calculatesand stores the duration ΔT in accordance with the equation (4). Thememory/calculator 602 sends the time duration stored therein as signalS705 to the comparator 605.

On the other hand, the calculator 603 calculates the degree of encodingdifficulty S704 of each encoding picture group based upon the originalinput picture signal S701 entering the terminal 600 and sends the degreeof encoding difficulty S704 to the memory 604. The memory 604temporarily stores the degree of encoding difficulty S704 of eachencoding picture group and sends the degree of encoding difficulty S704stored therein to the comparator 605 as signal S706. The degree ofencoding difficulty as found by the calculator 603 means the amount ofinformation generated during encoding by e.g., MPEG2 per encodingpicture group with the quantization step size equal to 1.

The comparator 605 calculates the target bit amount G allocated to eachencoding picture group, based upon the time duration ΔT supplied fromthe memory/calculator 602 and the degree of encoding difficulty suppliedfrom the memory 604. For example, the comparator calculates the targetbit amount G in proportion to the degree of encoding difficulty. Ingeneral, in the variable rate encoding method, the maximum value of thetarget bit amount G is limited by the ability of the transmissionsystem, for example, by the transmission bit rate. Thus the mean bitrate per N frames is designed not to surpass a pre-set maximum value.That is, the comparator 605 finds the mean bit rate bit₋₋ rate every Nframes in accordance with the equation (8):

    bit.sub.-- rate=G/ΔT                                 (8)

and clips the mean bit₋₋ rate bit rate to its maximum value maximumbit₋₋ rate. On the other hand, if the mean bit rate bit₋₋ rate isclipped, the comparator 605 calculates the bit amount ΔG which has notbeen used for this reason in accordance with the equation (9):

    ΔG=(bit.sub.-- rate-maximum.sub.-- bit.sub.-- rate)×ΔT(9)

and supplements the bit amount ΔG for encoding remaining encodingpicture groups. For example, the comparator 605 adds the bit amount ΔGto the target bit amount G of the following encoding picture groups.

In the above equations (8) and (9), G is the target bit amount as foundbased upon the degree of encoding difficulty of the encoding picturegroups and ΔT is the time duration of the encoding picture groups.

The comparator 605 sends the target bit amount G, found as describedabove, to the encoding unit 606 as signal S707.

The encoding unit 606 is fed with the encoding frame signal S702 of thecurrent encoding picture group from the pre-processor 601. The encodingunit 606 encodes the encoding frame signal S702 based upon the targetbit amount G supplied thereto from the comparator 605. The encoding unit606 outputs the encoded information as a bit stream at a terminal 607.

What is claimed is:
 1. A method for encoding input moving picturesignals comprising the steps of:forming encoding picture groups eachgroup comprising a pre-set number of encoding pictures from a pluralityof original pictures represented by said input moving picture signals,wherein said original pictures comprise frames of said moving picturesignal, and said encoding pictures are produced by removing thoseoriginal pictures which are redundant within said frames; calculatingthe number of original pictures used for forming said encoding picturegroups; calculating a group-based target bit amount based upon thecalculated number of said original pictures; and encoding the movingpicture signals of the encoding pictures on the basis of the target bitamount on the group basis.
 2. The method as claimed in claim 1, whereinthe number of the encoding pictures making up each said group isvariable.
 3. The method as claimed in claim 1, wherein the step ofcalculating the target amount of the information includes sub-steps ofcalculating a time duration of each said group based upon the calculatednumber of the original pictures, and calculating the target amount ofinformation of each said group based upon the calculated time duration.4. The method as claimed in claim 1, wherein the step of calculating thetarget amount of the information includes the sub-steps of calculatingthe encoding picture rate of each said group based upon the calculatednumber of the original pictures, and calculating the target amount ofinformation of each said group based upon the calculated encodingpicture rate.
 5. An apparatus for encoding input moving picture signalscomprising:means for forming encoding picture groups each groupcomprising a pre-set number of encoding pictures from a plurality oforiginal pictures represented by said input moving picture signals,wherein said original pictures comprise frames of said moving picturesignal, and said encoding pictures are produced by removing thoseoriginal pictures which are redundant within said frames; means forcalculating the number of original pictures used for forming saidencoding picture groups in said group forming means; means forcalculating a group-based target bit amount based upon the calculatednumber of said original pictures from said original picture numbercalculating means; and means for encoding the moving picture signals ofthe encoding pictures on the basis group target bit amount on the groupbasis.
 6. The apparatus as claimed in claim 5, wherein the number of theencoding pictures making up said groups in said group forming means isvariable.
 7. An apparatus for encoding input moving picture signalscomprising:pre-processing means for forming encoding picture groups eachgroup comprising pre-set numbers of encoding pictures from a pluralityof original pictures represented by said input moving picture signalsand for calculating the numbers of the original pictures used forforming the respective groups, wherein said original pictures compriseframes of said moving picture signal, and said encoding pictures areproduced by removing those original pictures which are redundant withinsaid frames; means for calculating time of duration of the respectivegroups based upon the numbers of the original pictures from saidpre-processing means and storing the calculated time duration; means forcalculating degree of encoding difficulty of the respective groups basedupon the input moving picture signals; memory means for storing thedegree of encoding difficulties of the respective groups from saidencoding difficulty calculating means; means for calculating agroup-based target amount of the information based upon the duration oftime from said time duration calculating means and the degree ofencoding difficulties from said memory means; and encoding means forgroup-based encoding of the moving picture signals of the encodingpictures from said pre-processing means based upon the target amount ofinformation from said information amount calculating means.
 8. Theapparatus as claimed in claim 7, wherein said information amountcalculating means provides a maximum value of the target amount ofinformation.
 9. The apparatus as claimed in claim 7, wherein said timeduration calculating means stores at least one of the number of originalpictures from said pre-pressing means, the time duration calculatedbased upon the numbers of the original pictures and the encoding picturerate calculated based upon the numbers of the original pictures, andwherein said information amount calculating means calculates the targetamount of information using the numbers of original pictures, timeduration or the encoding picture rate as stored in said durationcalculating means when the moving picture signals encoded by saidcalculating means.
 10. A recording medium having recorded thereon movingpicture signals having a bit stream obtained from forming encodingpicture groups each group comprising a pre-set number of encodingpictures from a plurality of original pictures indicated by said inputmoving picture signals, calculating the number of original pictures usedfor forming said encoding picture groups, wherein said original picturescomprise frames of said moving picture signal, and said encodingpictures are produced by removing those original pictures which areredundant within said frames, calculating the group-based target bitamount based upon the calculated number of original pictures, andencoding the moving picture signals of the encoding pictures on thebasis of the target bit amount on the group basis.